USE [StockPredictor]
GO

/****** Object:  Table [dbo].[Portfolio]    Script Date: 10/5/2012 8:33:57 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Portfolio](
	[PortfolioId] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NOT NULL,
	[StockSymbol] [nvarchar](50) NOT NULL,
	[Shares] [float] NOT NULL,
 CONSTRAINT [PK_Portfolio] PRIMARY KEY CLUSTERED 
(
	[PortfolioId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Portfolio]  WITH CHECK ADD  CONSTRAINT [FK_Portfolio_UserProfile] FOREIGN KEY([UserId])
REFERENCES [dbo].[UserProfile] ([UserId])
GO

ALTER TABLE [dbo].[Portfolio] CHECK CONSTRAINT [FK_Portfolio_UserProfile]
GO


